package com.limeng.datastruts.alth.ra;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Stack;

public class HelloWorld {

    public static void main(String[] args) {
        printRa("Hello, World" , 6);
        System.out.println(minus(17));
        int[] nums = {1,2,3,5,9};
        int sum = Arrays.stream(nums).sum();
        System.out.println(sum);

        Stack<String> stack = new Stack<>();
    }

    private static void printRa(String word, int n){
        if(n<=0) return;
        System.out.println(word);
        printRa(word,--n);
    }

    private static int minus(int num){
        if(num % 3==0) return num;
        return minus(num-1);
    }
}
